{include file="Public:header2"/}
<body style="min-height: 100%;background-color: #fff">
<style type="text/css">
    .ggg{
        width:600px !important
    }
</style>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form onsubmit="return false;">
                        <div class="layui-form" wid100 lay-filter="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">appId</label>
                                <div class="layui-input-inline ggg" >
                                    <input type="text" name="app_id" value="{$data.app_id}" lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">aliPublicKey</label>
                                <div class="layui-input-inline ggg">
                                    <input type="text" name="ali_public_key" value="{$data.ali_public_key}" lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">privateKey</label>
                                <div class="layui-input-inline ggg">
                                    <input type="text" name="private_key" value="{$data.private_key}" lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <input type="hidden" name="key" value="{$key}" lay-verify="required" class="layui-input">
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" onclick="return check()">确认保存</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="Public:footer"/}
</body>
</html>
<script type="text/javascript">
    layui.use(['layer','form','upload','element'], function(){
        var $ = layui.$;
        
    });

    function check(){
        var url="{:url('/admin/update')}";
        var $ = layui.$;
        var load=layer.load(2);
        $.post(url,$("form").serialize(),function(data){
            if(data.status==1){
                layer.msg(data.msg,{icon:1,time:1000},function(){
                    location.reload();
                });
            }else{
                layer.msg(data.msg,{icon:2,anim:6,time:1500},function(){
                    layer.close(load);
                });
            }
        })
    }
</script>